﻿using SecurityApi.DataAccess;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SecurityApi.Business
{
    public class UserApplicationManager
    {
        private UserApplicationRepository _repository = new UserApplicationRepository();

        public List<SecurityApi.Model.Application> GetUserApplications(string userName, int enterpriseId=1)
        {
           IQueryable<SecurityApi.Model.Application> query = _repository.GetUserApplications(userName,enterpriseId);
           return query.ToList();
        }

        public List<SecurityApi.Model.Application> GetUserApplications(int userId, int enterpriseId = 1)
        {
            IQueryable<SecurityApi.Model.Application> query = _repository.GetUserApplications(userId, enterpriseId);
            return query.ToList();
        }

    }
}
